<template>
    <div id="discount">
        <div class="b1">
            <h1 :id="id">{{arr.coupon_name}}</h1><span>元全国通用</span>
        </div>
        <b>￥</b>
        <div class="num" >{{ arr.money }}</div>
        <i>尚余{{ arr.coupon_num }}杯</i>
    </div>
</template>
<script setup>
//从父组件把值接来
const props =defineProps(['arr'])

</script>

<style scoped lang="scss">
#discount {
    position: relative;
    width: 168px;
    height: 105px;
    left: 15px;
    top: 10px;
    margin-right: 9px;
    margin-top: 5px;
    background-image: url(../../assets/discountCoupon.png);
    background-size: 100% ;
    background-repeat: no-repeat;

    .b1{
        position: relative;
    }
    h1 {
        position: absolute;
        top: 12px;
        left: 20px;
        display: inline-block;
        font-size: 16px;
        color: rgba(56, 56, 56, 1);
    }

    span {
        position: absolute;
        display: inline-block;
        width: 66px;
        height: 19px;
        top: 13px;
        bottom: 73px;
        left: 48px;
        right: 75px;
        font-size: 13px;
        color: rgba(56, 56, 56, 1);
    }

    b {
        position: absolute;
        display: inline-block;
        width: 8px;
        height: 21px;
        left: 20px;
        top: 50px;
        color: rgba(0, 0, 0, 1);
        font-size: 14px;
    }

     .num {
        position: absolute;
        display: inline-block;
        width: 24px;
        height: 36px;
        left: 35px;
        top: 45px;
        color: rgba(0, 0, 0, 1);
        font-size: 24px;
    }

    i {
        position: absolute;
        display: inline-block;
        width: 60px;
        height: 19px;
        left: 15px;
        top: 76px;
        right: 109px;
        bottom: 10px;
        color: rgba(166, 166, 166, 1);
        font-size: 13px;
    }
}
</style>
